package Equals_And_Tostring;

public class Test {
    public static void main(String[] args) {
        Person p1 = new Person("zhangsan", 25);
        System.out.println(p1);
        Person p2 = new Person("zhangsan", 25);
        System.out.println(p2);

        System.out.println(p1 == p2);
//        Person p3 = p1;
//        System.out.println(p3.equals(p1));
//        System.out.println(p1.equals(p2));
        System.out.println(p1.hashCode());
        System.out.println(p2.hashCode());
        System.out.println(p1 == p2);
    }
}
